.class public Lcom/brixd/niceapp/ui/ConfirmDialog;
.super Landroid/app/Dialog;
.source "ConfirmDialog.java"


# instance fields
.field private mBtnCancel:Landroid/widget/Button;

.field private mBtnConfirm:Landroid/widget/Button;

.field private mCheckbox:Landroid/widget/CheckBox;

.field private mMessage:Landroid/widget/TextView;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 21
    const v0, 0x7f0d001a

    invoke-direct {p0, p1, v0}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    .line 22
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->init(Z)V

    .line 23
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Z)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "isShowCheckbox"    # Z

    .prologue
    .line 26
    const v0, 0x7f0d001a

    invoke-direct {p0, p1, v0}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    .line 27
    const/4 v0, 0x1

    invoke-direct {p0, v0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->init(Z)V

    .line 28
    return-void
.end method

.method private init(Z)V
    .registers 5
    .param p1, "isShowCheckbox"    # Z

    .prologue
    .line 31
    const v1, 0x7f030035

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/ui/ConfirmDialog;->setContentView(I)V

    .line 33
    invoke-virtual {p0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->getWindow()Landroid/view/Window;

    move-result-object v1

    invoke-virtual {v1}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

    move-result-object v0

    .line 34
    .local v0, "params":Landroid/view/WindowManager$LayoutParams;
    const/4 v1, -0x1

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->width:I

    .line 35
    const/4 v1, -0x2

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->height:I

    .line 36
    const/high16 v1, 0x3f000000

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->dimAmount:F

    .line 37
    iget v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I

    or-int/lit8 v1, v1, 0x2

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->flags:I

    .line 39
    invoke-virtual {p0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->getWindow()Landroid/view/Window;

    move-result-object v1

    const/16 v2, 0x10

    invoke-virtual {v1, v2}, Landroid/view/Window;->setGravity(I)V

    .line 41
    const v1, 0x7f0a00d2

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/ui/ConfirmDialog;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mMessage:Landroid/widget/TextView;

    .line 42
    const v1, 0x7f0a00db

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/ui/ConfirmDialog;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/CheckBox;

    iput-object v1, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mCheckbox:Landroid/widget/CheckBox;

    .line 43
    const v1, 0x7f0a00dc

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/ui/ConfirmDialog;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mBtnCancel:Landroid/widget/Button;

    .line 44
    const v1, 0x7f0a00d3

    invoke-virtual {p0, v1}, Lcom/brixd/niceapp/ui/ConfirmDialog;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mBtnConfirm:Landroid/widget/Button;

    .line 45
    if-eqz p1, :cond_5c

    .line 46
    iget-object v1, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mCheckbox:Landroid/widget/CheckBox;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/widget/CheckBox;->setVisibility(I)V

    .line 50
    :goto_5b
    return-void

    .line 48
    :cond_5c
    iget-object v1, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mCheckbox:Landroid/widget/CheckBox;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Landroid/widget/CheckBox;->setVisibility(I)V

    goto :goto_5b
.end method


# virtual methods
.method public getCheckboxState()Z
    .registers 2

    .prologue
    .line 65
    iget-object v0, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mCheckbox:Landroid/widget/CheckBox;

    invoke-virtual {v0}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v0

    return v0
.end method

.method public setCancelButtonText(I)V
    .registers 3
    .param p1, "resId"    # I

    .prologue
    .line 85
    invoke-virtual {p0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->setCancelButtonText(Ljava/lang/String;)V

    .line 86
    return-void
.end method

.method public setCancelButtonText(Ljava/lang/String;)V
    .registers 3
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 89
    iget-object v0, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mBtnCancel:Landroid/widget/Button;

    invoke-virtual {v0, p1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 90
    return-void
.end method

.method public setCheckboxState(Z)V
    .registers 3
    .param p1, "isChecked"    # Z

    .prologue
    .line 61
    iget-object v0, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mCheckbox:Landroid/widget/CheckBox;

    invoke-virtual {v0, p1}, Landroid/widget/CheckBox;->setChecked(Z)V

    .line 62
    return-void
.end method

.method public setCheckboxText(I)V
    .registers 3
    .param p1, "resId"    # I

    .prologue
    .line 69
    invoke-virtual {p0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->setCheckboxText(Ljava/lang/String;)V

    .line 70
    return-void
.end method

.method public setCheckboxText(Ljava/lang/String;)V
    .registers 3
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 73
    iget-object v0, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mCheckbox:Landroid/widget/CheckBox;

    invoke-virtual {v0, p1}, Landroid/widget/CheckBox;->setText(Ljava/lang/CharSequence;)V

    .line 74
    return-void
.end method

.method public setConfirmButtonText(I)V
    .registers 3
    .param p1, "resId"    # I

    .prologue
    .line 77
    invoke-virtual {p0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->setConfirmButtonText(Ljava/lang/String;)V

    .line 78
    return-void
.end method

.method public setConfirmButtonText(Ljava/lang/String;)V
    .registers 3
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 81
    iget-object v0, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mBtnConfirm:Landroid/widget/Button;

    invoke-virtual {v0, p1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 82
    return-void
.end method

.method public setMessage(I)V
    .registers 3
    .param p1, "resId"    # I

    .prologue
    .line 53
    invoke-virtual {p0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/ui/ConfirmDialog;->setMessage(Ljava/lang/String;)V

    .line 54
    return-void
.end method

.method public setMessage(Ljava/lang/String;)V
    .registers 3
    .param p1, "text"    # Ljava/lang/String;

    .prologue
    .line 57
    iget-object v0, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mMessage:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 58
    return-void
.end method

.method public setOnCancelClickListener(Landroid/view/View$OnClickListener;)V
    .registers 3
    .param p1, "listener"    # Landroid/view/View$OnClickListener;

    .prologue
    .line 93
    iget-object v0, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mBtnCancel:Landroid/widget/Button;

    invoke-virtual {v0, p1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 94
    return-void
.end method

.method public setOnConfirmClickListener(Landroid/view/View$OnClickListener;)V
    .registers 3
    .param p1, "listener"    # Landroid/view/View$OnClickListener;

    .prologue
    .line 97
    iget-object v0, p0, Lcom/brixd/niceapp/ui/ConfirmDialog;->mBtnConfirm:Landroid/widget/Button;

    invoke-virtual {v0, p1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 98
    return-void
.end method
